import random

random_integer = random.randint(1, 100)
print(f"生成的随机整数: {random_integer}")

def get_user_input(prompt):
    while True:
        try:
            return int(input(prompt))
        except ValueError:
            print("无效输入，请输入一个整数。")

guess_number1 = input("请输入你猜的第一个数字：")
guess_number2 = input("请输入你猜的第二个数字：")
guess_number3 = input("请输入你猜的第三个数字：")

s = 0
while s < 3:
    if (guess_number1 == random_integer or
        guess_number2 == random_integer or
        guess_number3 == random_integer):
        print("你猜对了！")
        break
    s += 1
    if s == 3:
        print('正确数为', random_integer)


